﻿namespace ZR.Model.Souvenir
{
    /// <summary>
    /// 订单明细
    /// </summary>
    [SugarTable("souvenir_order_item")]
    public class OrderItem
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        
        [JsonConverter(typeof(ValueToStringConverter))]
        public long UserId { get; set; }
        
        /// <summary>
        /// 订单ID
        /// </summary>
        public int OrderId { get; set; }
        
        /// <summary>
        /// 纪念品ID
        /// </summary>
        public int ProductId { get; set; }
        
        /// <summary>
        /// 纪念品名称
        /// </summary>
        public string ProductName { get; set; }
        
        /// <summary>
        /// 图片ID
        /// </summary>
        [JsonConverter(typeof(ValueToStringConverter))]
        public long ImageId { get; set; }
        
        /// <summary>
        /// 生成订单时的纪念品单价(单位是元,保留两位小数)
        /// </summary>
        public decimal CurrentUnitPrice { get; set; }
        
        /// <summary>
        /// 纪念品数量
        /// </summary>
        public int Quantity { get; set; }
        
        /// <summary>
        /// 纪念品总价(单位是元,保留两位小数)
        /// </summary>
        public decimal TotalPrice { get; set; }
    }
}